package org.moriraaca.google.interview;

public class ExcelHelper {
	public int ordinal(String cell) {
		int sum = cell.charAt(0) - 'A' + 1;
		
		for (int i = 1; i < cell.length(); i++) {
			sum *= ('Z' - 'A' + 1);
			sum += cell.charAt(i) - 'A' + 1;
		}
		
		return sum;
	}
}
